<?php

/* @var $this \yii\web\View */

/* @var $content string */

use yii\helpers\Html;
use \yii\helpers\Url;

\backend\assets\MainAsset::register( $this );

$this->title = '管理后台';
$this->params[ 'breadcrumbs' ][] = $this->title;
?>
<?php $this->beginPage() ?>
<!DOCTYPE html>
<html lang = "<?= Yii::$app->language ?>">
<head>
	<meta charset = "<?= Yii::$app->charset ?>">

	<meta name = "viewport" content = "width=device-width, initial-scale=1">

	<meta name = "renderer" content = "webkit">

	<link rel = "shortcut icon" href = "/favicon.ico">

    <?= Html::csrfMetaTags() ?>
	<title><?= Html::encode( $this->title ) ?></title>
	<!--	<script>if(window.top !== window.self){ window.top.location = window.location;}</script>-->
    <?php $this->head() ?>
</head>

<body class = "fixed-sidebar full-height-layout gray-bg" style = "overflow:hidden">
<?php $this->beginBody() ?>
<div id = "wrapper">
	<!--左侧导航开始-->
	<nav class = "navbar-default navbar-static-side" role = "navigation">
		<div class = "nav-close"><i class = "fa fa-times-circle"></i>
		</div>
		<div class = "sidebar-collapse">
			<ul class = "nav" id = "side-menu">
				<!--管理员-->
				<li class = "nav-header">
					<div class = "dropdown profile-element" style = "text-align: center">
						<a data-toggle = "dropdown" class = "dropdown-toggle" href = "#">
							<span class = "clear">
							   <span class = "block m-t-xs">
								   <strong class = "font-bold"><?= Yii::$app->user->identity->nickname ?></strong>
							   </span>
							</span>
						</a>
					</div>
					<div class = "logo-element">
						<i class = "fa fa-cogs"></i>
					</div>
				</li>
				<!--主页-->
				<li>
					<a class = "J_menuItem" href = "<?= Url::to( [ 'index' ] ) ?>"><i class = "fa fa-home"></i><span class = "nav-label">主页</span></a>
				</li>
                <?php if ( \Yii::$app->user->identity->is_audit == 1 ) {?>
				<li>
                    <a href = "#">
						<i class = "fa fa-user"></i>
						<span class = "nav-label">审核申请</span>
						<span class = "fa arrow"></span>
					</a>
                    <ul class = "nav nav-second-level">
                        <li>
                            <a class = "J_menuItem" href = "<?= Url::to( [ 'index' ] ) ?>"><i class = "fa fa-user"></i><span class = "nav-label">采购申请</span><span class = "fa arrow"></span></a>
                            <ul class = "nav nav-third-level">
                                <li>
                                    <a class = "J_menuItem" href = "<?= Url::to( [ 'check/purchase-never' ] ) ?>">未审核</a>
                                </li>
                                <li>
                                    <a class = "J_menuItem" href = "<?= Url::to( [ 'check/purchase-yes' ] ) ?>">已通过</a>
                                </li>
                                <li>
                                    <a class = "J_menuItem" href = "<?= Url::to( [ 'check/purchase-no' ] ) ?>">未通过</a>
                                </li>
                            </ul>
                        </li>
                        <li>
                            <a class = "J_menuItem" href = "<?= Url::to( [ 'index' ] ) ?>"><i class = "fa fa-user"></i><span class = "nav-label">调拨申请</span><span class = "fa arrow"></span></a>
                            <ul class = "nav nav-third-level">
                                <li>
                                    <a class = "J_menuItem" href = "<?= Url::to( [ 'check/allocate-never' ] ) ?>">未审核</a>
                                </li>
                                <li>
                                    <a class = "J_menuItem" href = "<?= Url::to( [ 'check/allocate-yes' ] ) ?>">已通过</a>
                                </li>
                                <li>
                                    <a class = "J_menuItem" href = "<?= Url::to( [ 'check/allocate-no' ] ) ?>">未通过</a>
                                </li>
                            </ul>
                        </li>
                        <li>
                            <a class = "J_menuItem" href = "<?= Url::to( [ 'index' ] ) ?>"><i class = "fa fa-user"></i><span class = "nav-label">报废申请</span><span class = "fa arrow"></span></a>
                            <ul class = "nav nav-third-level">
                                <li>
                                    <a class = "J_menuItem" href = "<?= Url::to( [ 'check/scrap-never' ] ) ?>">未审核</a>
                                </li>
                                <li>
                                    <a class = "J_menuItem" href = "<?= Url::to( [ 'check/scrap-yes' ] ) ?>">已通过</a>
                                </li>
                                <li>
                                    <a class = "J_menuItem" href = "<?= Url::to( [ 'check/scrap-no' ] ) ?>">未通过</a>
                                </li>
                            </ul>
                        </li>
                    </ul>
                </li>
                <?php }?>
                <?php if ( \Yii::$app->user->identity->is_check_project == 1 ||  \Yii::$app->user->identity->is_edit_notice == 1 ) {?>
                <li>
                    <a href = "#">
                        <i class = "fa fa-user"></i>
                        <span class = "nav-label">项目管理</span>
                        <span class = "fa arrow"></span>
                    </a>
                    <ul class = "nav nav-second-level">
                        <li>
                            <a class = "J_menuItem" href = "<?= Url::to( [ 'project/index' ] ) ?>">项目列表</a>
                        </li>
                        <li>
                            <a class = "J_menuItem" href = "<?= Url::to( [ 'goods-name/index' ] ) ?>">物资种类</a>
                        </li>
                        <li>
                            <a class = "J_menuItem" href = "<?= Url::to( [ 'goods/index' ] ) ?>">物资列表</a>
                        </li>
                    </ul>
                </li>
                <?php }?>
                <?php if ( \Yii::$app->user->identity->is_edit_notice == 1  ) {?>
                <li>
                    <a href = "#">
                        <i class = "fa fa-user"></i>
                        <span class = "nav-label">公告管理</span>
                        <span class = "fa arrow"></span>
                    </a>
                    <ul class = "nav nav-second-level">
                        <li>
                            <a class = "J_menuItem" href = "<?= Url::to( [ 'banner/index' ] ) ?>">轮播图列表</a>
                        </li>
                    </ul>
                </li>
                <?php }?>
                <?php if ( \Yii::$app->user->identity->is_create_account == 1 ) {?>
                <li>
                    <a href = "#">
                        <i class = "fa fa-user"></i>
                        <span class = "nav-label">账号管理</span>
                        <span class = "fa arrow"></span>
                    </a>
                    <ul class = "nav nav-second-level">
                        <li>
                            <a class = "J_menuItem" href = "<?= Url::to( [ 'admin-user/index' ] ) ?>">后台账号列表</a>
                        </li>
                        <li>
                            <a class = "J_menuItem" href = "<?= Url::to( [ 'user/index' ] ) ?>">项目负责人列表</a>
                        </li>
                    </ul>
                </li>
                <?php }?>
			</ul>
		</div>
	</nav>
	<!--左侧导航结束-->
	<!--右侧部分开始-->
	<div id = "page-wrapper" class = "gray-bg dashbard-1">
		<div class = "row border-bottom">
			<nav class = "navbar navbar-static-top" role = "navigation" style = "margin-bottom: 0">
				<div class = "navbar-header">
					<a class = "navbar-minimalize minimalize-styl-2 btn btn-primary " href = "#"><i class = "fa fa-bars"></i></a>
				</div>
			</nav>
		</div>
		<!--按钮nav-->
		<div class = "row content-tabs">
			<button class = "roll-nav roll-left J_tabLeft"><i class = "fa fa-backward"></i></button>
			<!--主页按钮-->
			<nav class = "page-tabs J_menuTabs">
				<div class = "page-tabs-content">
					<a href = "javascript:;" class = "active J_menuTab" data-id = "<?= \yii\helpers\Url::to( [ 'index/index' ] ) ?>">主页</a>
				</div>
			</nav>
			<button class = "roll-nav roll-right J_tabRight"><i class = "fa fa-forward"></i></button>
			<!--关闭操作-->
			<div class = "btn-group roll-nav roll-right">
				<button class = "dropdown J_tabClose" data-toggle = "dropdown">关闭操作<span class = "caret"></span>
				</button>
				<ul role = "menu" class = "dropdown-menu dropdown-menu-right">
					<li class = "J_tabShowActive"><a>定位当前选项卡</a></li>
					<li class = "divider"></li>
					<li class = "J_tabCloseAll"><a>关闭全部选项卡</a></li>
					<li class = "J_tabCloseOther"><a>关闭其他选项卡</a></li>
				</ul>
			</div>
			<!--退出-->
			<a href = "<?= Url::to( [ 'login/logout' ] ) ?>" class = "roll-nav roll-right J_tabExit"><i class = "fa fa fa-sign-out"></i>退出</a>
		</div>
		<div class = "row J_mainContent" id = "content-main">
			<iframe class = "J_iframe" name = "iframe0" width = "100%" height = "100%" src = "<?= \yii\helpers\Url::to( [ 'index/index' ] ) ?>" frameborder = "0" data-id = "<?= \yii\helpers\Url::to( [ 'index/index' ] ) ?>" seamless></iframe>
		</div>
		<div class = "footer">
			<div class = "pull-right">Copyright <?= trim( Yii::$app->request->hostInfo , 'http://' ) ?> &copy; 2018</div>
		</div>
	</div>
	<!--右侧部分结束-->
</div>
<?php $this->endBody() ?>
<script>
    $(function () {
        toastr.options = {
            "closeButton": true,
            "debug": false,
            "progressBar": true,
            "positionClass": "toast-top-right",
            "onclick": null,
            "showDuration": "800",
            "hideDuration": "800",
            "timeOut": "60000",
            "extendedTimeOut": "500",
            "showEasing": "swing",
            "hideEasing": "linear",
            "showMethod": "fadeIn",
            "hideMethod": "fadeOut"
        };
    });
</script>
</body>
</html>
<?php $this->endPage() ?>
